﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="Miming.Model" assembly="miming">

    <class name="Module" table="modules">
        <id name="Id">
    		<generator class="native"/>
    	</id>
        <property name="Code"/>
        <property name="Name"/>
		<bag name="Privileges" inverse="true" cascade="all-delete-orphan">
    		<key column="ModuleId"/>
    		<one-to-many class="Privilege"/>
    	</bag>
    </class>

</hibernate-mapping>
